from boot import QFrame, QVBoxLayout, QWidget, Qt, Union, GlobalWidgetConfig, IMG_ROOT_DIR


__all__ = ["SearchListFrameBase"]


class SearchListFrameBase(QFrame):

    def __init__(self, parent: Union[QWidget, None] = None):
        super().__init__(parent=parent)

        # 基础设置
        self.setFixedWidth(GlobalWidgetConfig.list_widget_width)

        # 主垂直布局
        self.main_v_layout = QVBoxLayout()
        self.main_v_layout.setContentsMargins(0, 0, 0, 0)
        self.main_v_layout.setSpacing(0)
        self.main_v_layout.setAlignment(Qt.AlignTop | Qt.AlignHCenter)
        self.setLayout(self.main_v_layout)

        # 设置样式
        self._set_style_sheet()

    def _set_style_sheet(self):
        self.setStyleSheet("""
                    BillListFrame {
                        background-color: #FFFFFF;
                        border: none;
                        border-right: 1px solid #EEF0F2;
                    }
                """)